<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">  
      
    
    <h:head>
        <title>Error</title>
        <h:outputStylesheet library="css" name="OnlineLibrary-style.css"/>
    </h:head>
       <h:body>
           <div  class="container">
    <div class="header">
           <h3 id="main_logo">Online Library</h3>
     
    </div>
        
 
               
         <div class="sidebarleft">
             

            <ul class="nav">
            <li><a href="http://localhost:8080/OnlineLibrary/" >Home</a></li>
            <li><a href="http://localhost:8080/OnlineLibrary/search.xhtml">Search Catalog</a></li>
            <li><a href="http://localhost:8080/OnlineLibrary/patronsearch.xhtml">Patron Management</a></li>
            <li><h:link outcome="/admin/AddItems.xhtml" rendered="#{loginManagerBean.isAdmin()}">Add New Items</h:link></li>
            <li><h:link outcome="/admin/signup.xhtml" rendered="#{loginManagerBean.isAdmin()}">Add New Member</h:link></li>
            <li><h:link outcome="/admin/periodManagement.xhtml" rendered="#{loginManagerBean.isAdmin()}">Item Period Management</h:link></li>
            <li><h:link outcome="/admin/logs.xhtml" rendered="#{loginManagerBean.isAdmin()}">Activity Log</h:link></li>
            <li><h:link outcome="/browse_catalog.xhtml" rendered="#{loginManagerBean.isLoggedIn()}">Browse Catalog</h:link></li>
            <li><h:form><h:commandLink value="Logout" action="#{loginManagerBean.logout()}" rendered="#{not empty request.remoteUser}" /></h:form></li>
            </ul>
       
        </div><br/>
 
        <div class="content">
            <h3 id="errormessage">Login Failed</h3>
       <h:outputText value="Please Log In" rendered="#{loginManagerBean.isNotLoggedIn()}"/>
    <h:panelGroup rendered="#{loginManagerBean.isNotLoggedIn()}">
                      <h:form>
                          <h:inputText value="#{loginManagerBean.username}" size="25" /> <h:inputSecret value="#{loginManagerBean.password}" size="25"/>
             <h:commandButton value="Login" action="#{loginManagerBean.login()}"/>
                
                
                      </h:form> <h:outputText value="Login Failed" rendered="#{loginManagerBean.loginFailureMessage}"/>    
         </h:panelGroup>
        </div>
           </div>
        
    </h:body>
    
</html>

